package com.example.feign.feign;

import com.example.feign.feign.fallback.SysFallback;
import com.example.feign.util.Response;
import org.springframework.cloud.openfeign.FeignClient;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;


@FeignClient(value = "BASE-SERVICE",fallback = SysFallback.class)
public interface SysFeign {

    @RequestMapping(value = "/sys/imageUpload",method = RequestMethod.POST, consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})
    public Response imageUpload(@RequestPart(value = "file", required = false) MultipartFile file);
}
